// eslint-disable-next-line import/no-extraneous-dependencies
import mockjs from 'mockjs';

export default {
  'POST /api/adminer/add': (req, res) => {
    res.send(
      mockjs.mock(
        {
          ret: 0,
          error: null
        }
      ),
    );
  },
  'POST /api/adminer/list': (req, res) => {
    res.send(
      mockjs.mock(
        {
          ret: 0,
          data: {
            list: [
              {
                id: 1,
                account: 12381284951,
                name: "张三",
                time: 1627376921,
                type: "管理员",
                relation: "茶百道供应商",
              },
              {
                id: 2,
                account: 12381284951,
                name: "张三",
                time: 1627376921,
                type: "管理员",
                relation: "茶百道供应商",
              },
              {
                id: 3,
                account: 12381284951,
                name: "张三",
                time: 1627376921,
                type: "管理员",
                relation: "茶百道供应商",
                make: "编辑 删除",
              },
              {
                id: 4,
                account: 12381284951,
                name: "张三",
                time: 1627376921,
                type: "管理员",
                relation: "茶百道供应商",
              },
            ],
            total: 4,
            query: 4
          },
          error: null
        }
      ),
    );
  },
}
